#include <stdio.h>


enum bride
{
    X = 1,
    Y,
    Z
};

char marry(int x)
{
    if(x == 1)
        return 'X';
    else if(x == 2)
        return 'Y';
    else if(x == 3)
        return 'Z'; 
}

int main(void)
{
    int a, b, c;
    for(a=2; a<=Z; a++)
    {
        for(b=1; b<=Z; b++)
        {
            if(a == b)
                continue;
            for(c=2; c<Z; c++)
            {
                if(a == c || b == c)
                    continue;
                printf("a marry %c, b marry %c, c marry %c\n", marry(a), marry(b), marry(c));
            }
        }    
    }
    return 0;
}